import { createSSRApp } from 'vue'
import {createRouter} from './router'
import App from './App.vue'
import { createPinia } from "pinia";
import elementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// SSR requires a fresh app instance per request, therefore we export a function
// that creates a fresh app instance. If using Vuex, we'd also be creating a
// fresh store here.
export function createApp() {
  const app = createSSRApp(App);
  const router = createRouter();
  const pinia = createPinia();
  app.use(elementPlus);
  app.use(pinia);
  app.use(router);
  
  return { app ,router,pinia}
}
